OBJECTS=Thread.o ThreadQueue.o Mutex.o Event.o Semaphore.o RWLock.o
CFLAGS=-g -c
CC=g++

all:libqythread.a 

libqythread.a: $(OBJECTS) ../common/util.o
	ar -r libqythread.a $(OBJECTS) ../common/util.o

ThreadQueue.o: Thread.h ThreadQueue.h ThreadQueue.cpp
	$(CC) $(CFLAGS) ThreadQueue.cpp

Thread.o: Thread.h Thread.cpp
	$(CC) $(CFLAGS) Thread.cpp

Mutex.o: Mutex.h Mutex.cpp
	$(CC) $(CFLAGS) Mutex.cpp

Event.o: Event.h Event.cpp
	$(CC) $(CFLAGS) Event.cpp

Semaphore.o: Semaphore.h Semaphore.cpp
	$(CC) $(CFLAGS) Semaphore.cpp

SpinLock.o: SpinLock.h SpinLock.cpp
	$(CC) $(CFLAGS) SpinLock.cpp

RWLock.o: RWLock.h RWLock.cpp
	$(CC) $(CFLAGS) RWLock.cpp

clean:
	rm -rf $(OBJECTS) libqythread.a

